home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic Source Code
/
Visual Basic Source Code.iso
/
vbsource
/
vbdb
/
browser.frm
next >
Wrap
Text File
|
1995-09-06
|
5KB
|
197 lines
VERSION 2.00
Begin Form Browse
BorderStyle = 3 'Fixed Double
Caption = "Browse Database"
ClientHeight = 4185
ClientLeft = 1170
ClientTop = 1755
ClientWidth = 7200
ControlBox = 0 'False
Height = 4590
Left = 1110
LinkMode = 1 'Source
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 4185
ScaleWidth = 7200
Top = 1410
Width = 7320
Begin CommandButton Command3
Caption = "&Quit"
Height = 372
Left = 6000
TabIndex = 2
Top = 3720
Width = 1092
End
Begin TextBox TimeDisp
Height = 372
Left = 5040
TabIndex = 9
Top = 3720
Width = 732
End
Begin TextBox RecordStat
Height = 372
Left = 2760
TabIndex = 7
Top = 3720
Width = 1092
End
Begin TextBox RecordNo
Height = 372
Left = 1080
TabIndex = 1
Top = 3720
Width = 732
End
Begin TextBox Text1
BackColor = &H00C0C0C0&
Enabled = 0 'False
Height = 612
Left = -120
TabIndex = 5
Top = 3600
Width = 7332
End
Begin HScrollBar RecordBar
Height = 252
Left = 0
TabIndex = 4
Top = 3360
Width = 7212
End
Begin TextBox RecordData
FontBold = -1 'True
FontItalic = 0 'False
FontName = "Courier"
FontSize = 9.75
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 3372
Left = 0
MultiLine = -1 'True
TabIndex = 0
Text = "Text1"
Top = 0
Width = 7212
End
Begin Label Label3
Alignment = 1 'Right Justify
BackColor = &H00C0C0C0&
Caption = "Time to get record:"
Height = 492
Left = 3960
TabIndex = 8
Top = 3720
Width = 972
End
Begin Label Label2
Alignment = 1 'Right Justify
BackColor = &H00C0C0C0&
Caption = "Record status:"
Height = 372
Left = 1800
TabIndex = 6
Top = 3720
Width = 852
End
Begin Label Label1
Alignment = 1 'Right Justify
BackColor = &H00C0C0C0&
Caption = "This record:"
Height = 372
Left = 120
TabIndex = 3
Top = 3720
Width = 852
End
End
'
'Code for Visual Basic 1.0 and Windows 3.0
'(C)1991 Marquis Computing. All Rights Reserved.
'
'Database file browser
'
DefInt A-Z
Dim NumRecs&, Record&
Sub Command3_Click ()
Unload Browse
End Sub
Sub DisplayRecord (Record&)
'
'Record browser routine
'
Static OldRec&
If Record& > NumRecs& Then
Record& = 1
ElseIf Record& <= 0 Then
Record& = NumRecs&
End If
If Record& <> OldRec& Then
OldRec& = Record&
InTime# = Timer
GetREC DBFHandle, Status, Record&, RecData$
Outime# = Timer
TimeDisp.Text = Str$(Outime# - InTime#)
If Left$(RecData$, 1) = "*" Then
RecordStat.Text = "deleted"
Else
RecordStat.Text = "normal"
End If
RecordData.Text = RecData$
RecordNo.Text = LTrim$(Str$(Record&))
End If
End Sub
Sub Form_Load ()
Screen.MousePointer = 11
WinWidth = (Screen.Width - Browse.Width) \ 2
WinHieght = (Screen.Height - Browse.Height) \ 2
Browse.Move WinWidth, WinHieght
StatusDBF DBFHandle, FileName$, DBFType$, DBTPtr, NumRecs&, NumFlds, RecLen, UpDate$, Status
Browse.Caption = "Browsing " + FileName$
RecordBar.Min = 1
RecordBar.Max = NumRecs&
RecordBar.SmallChange = 1
C = NumRecs& \ 10
If C = 0 Then C = NumRecs&
If C = 0 Then C = 1
RecordBar.LargeChange = C
Record& = 1
DisplayRecord Record&
Screen.MousePointer = 0
End Sub
Sub RecordBar_Change ()
Record& = RecordBar.Value
DisplayRecord Record&
End Sub